//
//  Contact.m
//  17_Work Contact
//
//  Created by dllo on 16/8/6.
//  Copyright © 2016年 yh. All rights reserved.
//

#import "Contact.h"

@implementation Contact

- (instancetype)initWithPicImage:(NSString *)picImage name:(NSString *)name phoneNum:(NSString *)phoneNum address:(NSString *)address {
    self = [super init];
    if (self) {
        _picImage = picImage;
        _name = name;
        _phoneNum = phoneNum;
        _address = address;
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        _picImage = [aDecoder decodeObjectForKey:@"picImage"];
        _name = [aDecoder decodeObjectForKey:@"name"];
        _phoneNum = [aDecoder decodeObjectForKey:@"phoneNum"];
        _address = [aDecoder decodeObjectForKey:@"address"];
    }
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:_picImage forKey:@"picImage"];
    [aCoder encodeObject:_name forKey:@"name"];
    [aCoder encodeObject:_phoneNum forKey:@"phoneNum"];
    [aCoder encodeObject:_address forKey:@"address"];
}


@end
